#ifndef HAVE_TEXT2XML_LIST_ITER_H
#define HAVE_TEXT2XML_LIST_ITER_H

#include "List.h"

#ifdef __cplusplus
extern "C" {
#endif
  typedef struct _List ListIter;

  /**
   * Returns a new list iterator.
   */
  ListIter* list_iter_new(List* list);

  /**
   * Destroys the iterator.
   */
  void list_iter_free(ListIter* iter);

  /**
   * Points the iterator to the previous item.
   */
  ListIter* list_iter_prev(ListIter* iter);

  /**
   * Points the iterator to the next item.
   */
  ListIter* list_iter_next(ListIter* iter);

  /**
   * Returns the data pointed to by the iterator.
   */
  void* list_iter_get_data(ListIter* iter);
#ifdef __cplusplus
}
#endif                          /* __cplusplus */
#endif                          /* HAVE_TEXT2XML_LIST_ITER_H */
